<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<title>商品管理</title>
		<link rel="stylesheet" type="text/css" href="ipiinclude/ipicss/master.css" />
		<link href="ipiinclude/ipiplugin/uploadify/css/uploadify.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
		<div class="right_cont">
			<input type="hidden" id="hid_contextpath" value="<%=path%>" />
			<!--  
		  	<div class="prompt_box_show rd"> <span onclick="hidePromptBoxshow()"></span> × 请输入投递消息！ </div>
		 	-->
		  <div id="title_Operation">
		    <div class="register_title">修改商品</div>
		    <div class="right_title_r"></div>
		  </div>
		  <form id="theForm"  action="productManager_modifyExc.action">
		  <table class="tablefrom mt15">
		    <tr>
		      <th class="left">商品名称</th>
		      <td><input id="name" title="商品名称" maxLength="60" name="product.name" type="text" class="textd" value="${product.name }"/> <span>*</span></td>
		    </tr>
		    <tr>
		      <th class="left">商品价格</th>
		      <td><input id="priceYuan" title="商品价格" maxLength="8"  type="text" class="textd" value="<fmt:formatNumber value='${product.price / 100.0}' pattern='#0.00' />"/> &nbsp;元<span>*</span></td>
		    </tr>
		    	<input type="hidden" id="price"  name="product.price"  />
		    	<input type="hidden" id="createTime"  name="product.createTime"  value="${product.createTime }"/>
		    	<input type="hidden" id="id"  name="product.id"  value="${product.id }"/>
		    	<input type="hidden" id="status"  name="product.status"  value="${product.status }"/>
		    <tr>
		      <th class="left">商品图片</th>
		      <td>
	      		<input id="imgB" title="宣传图片" type="file" />
				<input type="hidden" id="hid_imgB" />
				<input type="hidden" id="hid_img" />
				<input type="hidden" id="hid_imgS" />
				<span id="img_queueID" style="display: inline-block; margin-left: 10px;"></span>
				<br/>
				<input id="imgElem" style="color: red; border: 0px solid red; width: 520px;" type="text"
					readonly="readonly" value="注：图片格式支持jpeg,jpg，建议最佳尺寸253*253像素，文件最大不超过20M" />
				<br/>
	      		<img id="previewImg" style="display: none;" src="" />
		      </td>
		    </tr>
		    <!-- 
		    <tr>
		      <td class="left">商品状态</td>
		      <td><select id="status" title="商品状态" name="text04" class="sel01">
		      		<option value="1">--未上架--</option>
		      	  </select> <span>*</span></td>
		    </tr>
		     -->
		    <tr>
		      <th class="left">是否热门商品</th>
		      <td><select id="isHot" name="product.isHot" class="selb">
		      		<option value="1">是</option>
		      		<option value="2">不是</option>
		      	  </select> <span>*</span></td>
		    </tr>
		    <tr>
		      <th class="left">是否推荐商品</th>
		      <td><select id="isRecommand" name="product.isRecommand" class="selb">
		      		<option value="1">是</option>
		      		<option value="2">不是</option>
		      	  </select> <span>*</span></td>
		    </tr>
		    <tr>
		      <th class="left">商品类型</th>
		      <td><select id="type" title="商品类型" name="product.type" class="selb">
		     		 <option value="1">普通</option>
		      		<option value="2">特价</option>
		      	  </select> <span>*</span></td>
		    </tr>
		    <tr>
		      <th class="left">排序编号</th>
		      <td><input id="indexId" title="排序编号" maxLength="8" name="product.indexId" type="text" class="textd"  value="${product.indexId }"/>
		        <span>* 数字越大，排序越靠前</span></td>
		    </tr>
		    <tr>
		      <th class="left">商品简介</th>
		      <td><textarea id="remark" title="商品简介" rows="5" style="width:450px" maxLength="120" name="product.remark"  class="inp_area_240" onkeyup="this.value = this.value.substring(0,120)">${product.remark }</textarea>
		        <span>*</span></td>
		    </tr>
		    <tr>
		      <th class="left">商品详情</th>
		      <td><textarea id="detail" title="商品详情" rows="5" style="width:450px" maxLength="120" name="product.detail" class="inp_area_240" onkeyup="this.value = this.value.substring(0,120)">${product.detail }</textarea>
		        <span>*</span></td>
		    </tr>
		    <tr>
		    <th ></th>
		     <td> <input name="" type="button"  class="btnf_a" value="确 定"  onclick="toSubmit()" /><input name="" type="button"  class="btnf_a" value="返 回" onclick="window.location.href='userIndex_list.action'" /></td>
		    </tr>
		  </table>
		  </form>
		  <a id="mypreview" href="<%=request.getContextPath()%>" name="<%=request.getContextPath()%>"	class="glmb"></a>
		  <input type="hidden" id="hid_isHot" value="${product.isHot }">
		  <input type="hidden" id="hid_isRecommand" value="${product.isRecommand }">
		  <input type="hidden" id="hid_type" value="${product.type }">
		</div>
		<script type="text/javascript" src="ipiinclude/ipijs/common/jquery.js"></script>
		<script type="text/javascript" src="ipiinclude/ipijs/common/function.js"></script>
		
		<script type="text/javascript" src="ipiinclude/ipiplugin/uploadify/scripts/swfobject.js"></script>
		<script type="text/javascript" src="ipiinclude/ipiplugin/uploadify/scripts/jquery.uploadify.js"></script>
		<script type="text/javascript" src="ipiinclude/ipijs/admin/product/product_modify.js"></script>
	</body>
</html>
